{literal}
<script language="javascript">
    function newwindow(url, width, height)
    {        
        var LargeWin=window.open(url,"SmallWin","toolbar=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes,width="+(width+20)+",height="+(height+20));
        LargeWin.window.focus();
    } 
</script>
{/literal}

<br>	
   &nbsp;&nbsp;&nbsp;<font size="3px">Vendors Statistics:</font>
<br><br>

	
	<table align1="center" cellpadding="2" cellspacing="2" border="1"> 
		<tr style="background-color: #ffffcf; border: solid 1px #3997FF;">
			<td  align="center" >#</td>
			<td  align="center" width="155" >Mail title</td>
			<td  align="center" width="133" >Mail subject</td>
			<td  align="center" >Date of sending</td>
			<td  align="center" width1="52">Sent qty (100%)</td>
			<td  align="center" width="92" colspan=2>Visit qty</td>
			<td  align="center" width="92" colspan=2>Buy qty</td>
		</tr>
	{foreach from=$stat item=item}
		<tr  style="background-color: #ffffff; border: solid 1px #3997FF;">
			<td  align="right">{$item.id_grouping}</td>
			<td  align="left"><a href="?path=customerslist,newsletter&page=edit&id={$item.mail_id}" style="text-decoration: none;" title="View details"><div style="background-color: #e1f2ef; border: solid 1px #f97aaF; width:152; height:18;">&nbsp;&nbsp;{$item.template_name|truncate:22:"...":true}</div></a></td>
			<td  align="left"><font color="#77777">{$item.subject|truncate:22:"...":true}</font></td>
			<td  align="left">{$item.date}</td>
			<td  align="right"><font color="blue">{$item.qty}&nbsp;</font></td>
			<td  align="right" width="44"><font color="blue">{$item.sum_visit}</font></td>
			<td  align="right" nowrap><font color="#888888">{if ($item.qty!="" && $item.qty!=0)}{$item.sum_visit/$item.qty*100|string_format:"%.1f"}%{/if}</font></td>
			<td  align="right" width="44"><font color="blue">{$item.sum_buy}</font></td>
			<td  align="right" nowrap><font color="#888888">{if ($item.qty!="" && $item.qty!=0)}{$item.sum_buy/$item.qty*100|string_format:"%.1f"}%{/if}</font></td>
			
			<!--
			<td><table cellpadding="0" cellspacing="0" style="border: solid 1px #3997FF; width:200;"><tr>{if $user.mail_response_qty!="" && ($user.mail_response_qty/$mail_response_sum*200|string_format:"%d" > 0)}<td style="background-color: #ef9faf; width:{$user.mail_response_qty/$mail_response_sum*200|string_format:"%d"}; height:13;"></td>{/if}{if ($user.mail_response_qty/$mail_response_sum*200|string_format:"%d" < 200)}<td style="background-color: #efefff; height:13;"></td>{/if}<tr/></table></td>
			<td  align="right">{$user.mail_response_qty/$mail_response_sum*100|string_format:"%.1f"}%</td>
				
			<td align="right">&nbsp;{if $user.sum_rating=="" || $user.sum_rating==0}0%{else}{$user.sum_rating/$rating_sum*100|string_format:"%d"}%{/if}</td>
			-->
			
		</tr>
	{/foreach}
	</table>
		
   
<br><br>
&nbsp;
<input type='button' value='Cancel' class="button" onclick="javascript: history.back();"/>  &nbsp; <input type='button' value='Print' class="button" onclick="newwindow('?{$add_url}&page=print_l&doPrint=doPrint', 800, 600);"/>
